namespace MESData.ProductionPlan.API.DTO
{
    /// <summary>
    /// 销售订单查询条件DTO
    /// </summary>
    public class SalesOrderQueryDto
    {
        /// <summary>
        /// 销售单号/主题
        /// </summary>
        public string? SalesOrderNumberOrSubject { get; set; }
        
        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }
        
        /// <summary>
        /// 销售日期开始
        /// </summary>
        public DateTime? SalesDateStart { get; set; }
        
        /// <summary>
        /// 销售日期结束
        /// </summary>
        public DateTime? SalesDateEnd { get; set; }
        
        /// <summary>
        /// 采购状态
        /// </summary>
        public string? PurchaseStatus { get; set; }
        
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;
        
        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 10;
    }

    /// <summary>
    /// 销售订单返回DTO
    /// </summary>
    public class SalesOrderResultDto
    {
        /// <summary>
        /// 销售订单ID
        /// </summary>
        public int Id { get; set; }
        
        /// <summary>
        /// 销售单号
        /// </summary>
        public string SalesOrderNumber { get; set; } = string.Empty;
        
        /// <summary>
        /// 销售订单主题
        /// </summary>
        public string SalesOrderSubject { get; set; } = string.Empty;
        
        /// <summary>
        /// 客户名称
        /// </summary>
        public string CustomerName { get; set; } = string.Empty;
        
        /// <summary>
        /// 销售日期
        /// </summary>
        public DateTime SalesDate { get; set; }
        
        /// <summary>
        /// 采购状态
        /// </summary>
        public string PurchaseStatus { get; set; } = string.Empty;
        
        /// <summary>
        /// 物品概要
        /// </summary>
        public string ItemSummary { get; set; } = string.Empty;
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
    }

    /// <summary>
    /// 销售订单物品查询条件DTO
    /// </summary>
    public class SalesOrderItemQueryDto
    {
        /// <summary>
        /// 销售订单ID
        /// </summary>
        public int SalesOrderId { get; set; }
        
        /// <summary>
        /// 物品编号/名称/规格型号
        /// </summary>
        public string? ItemNumberOrNameOrModel { get; set; }
        
        /// <summary>
        /// 物品类别
        /// </summary>
        public string? ItemCategory { get; set; }
        
        /// <summary>
        /// 物品分类
        /// </summary>
        public string? ItemClassification { get; set; }
        
        /// <summary>
        /// 库存状态
        /// </summary>
        public string? InventoryStatus { get; set; }
        
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;
        
        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 10;
    }

    /// <summary>
    /// 销售订单物品返回DTO
    /// </summary>
    public class SalesOrderItemResultDto
    {
        /// <summary>
        /// 物品ID
        /// </summary>
        public int Id { get; set; }
        
        /// <summary>
        /// 物品编号
        /// </summary>
        public string ItemNumber { get; set; } = string.Empty;
        
        /// <summary>
        /// 物品名称
        /// </summary>
        public string ItemName { get; set; } = string.Empty;
        
        /// <summary>
        /// 规格型号
        /// </summary>
        public string SpecificationModel { get; set; } = string.Empty;
        
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; } = string.Empty;
        
        /// <summary>
        /// 物品类别
        /// </summary>
        public string ItemCategory { get; set; } = string.Empty;
        
        /// <summary>
        /// 物品分类
        /// </summary>
        public string ItemClassification { get; set; } = string.Empty;
        
        /// <summary>
        /// 品牌
        /// </summary>
        public string? Brand { get; set; }
        
        /// <summary>
        /// 总库存
        /// </summary>
        public int TotalInventory { get; set; }
        
        /// <summary>
        /// 销售数量
        /// </summary>
        public int SalesQuantity { get; set; }
    }
} 